import { BroadCastCall } from "../../../broadCast/BroadCastCall";
import { MessageBlock } from "../../../../../../Framework/MQ/MessageBlock";
import { SHuntDetail } from "../../../../../../Message/Game/SHuntDetail";
import { PetMingJuReplayInfo } from "../../../../view/pet/info/PetMingJuReplayInfo";
import { NetDispatcher } from "../../../../../mvc/core/NetDispatcher";
import { ServerCommand } from "../../../../mvc/ServerCommand";
type int = number;
//class PetMingHuntLevelDetailCommand
    
    export  class PetMingHuntLevelDetailCommand extends BroadCastCall
    {
        constructor(arg1: Object)
        {
            super(arg1);
            return;
        }

        public /* override */ call(arg1: MessageBlock): void
        {
            var loc6=null;
            super.call(arg1);
            var loc1=arg1.messageBase as SHuntDetail;
            var loc2=[];
            var loc3=loc1.levelList;
            var loc4=loc1.itemCode;
            var loc5=loc1.isOpenNext;
            var loc7=0;
            while (loc7 < loc3.length) 
            {
                (loc6 = new PetMingJuReplayInfo()).level = loc3[loc7] as int;
                loc6.itemCode = loc4[loc7] as int;
                loc6.isOpenNext = loc5[loc7] as int == 1;
                loc2.push(loc6);
                ++loc7;
            }
            _cache.petMing.juReplayInfoArray = loc2;
            NetDispatcher.dispatchCmd(ServerCommand.PetMingHuntLevelDetailCommand, loc2);
            return;
        }
    }
